﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PROJECT_BOMBER.BLL
{
    public class AirCollision : CollisionStrategy
    {


        public override void Collision(ElementPhysique element2, ElementMove element)
        {
            if (element.Case.Intersects(element2.Case) && element.Fly && element.Position.Y - element2.Position.Y + element2.Height < 10)
            {
                element.Speed = new Microsoft.Xna.Framework.Vector2(element.Speed.X, 0);
            }
            else if (element.Case.Intersects(element2.Case) && element.Fly)
            {
                element.Speed = new Microsoft.Xna.Framework.Vector2(element.Speed.X, element.Speed.Y - element.Speedmin.Y * 4);
            }


        }

        public override void Collision(ElementMove element, ElementMove element2)
        {
        }
    }
}
